#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

void bubble_sort(int arr[], int sz)
{
	int i = 0;
	for (i = 0; i < sz - 1; i++)
	{
		int flag = 0;
		for (int j = 0; j <sz - 1 - i ; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				flag = 1;
				int temp = 0;
				temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
			}
		}
		if (flag == 0)
		{
			break;
		}
	}
}


void print_arr(int* str, int sz)

{

	int i = 0;

	for (i = 0; i < sz; i++)

	{

		printf("%d ", *(str + i));

	}

}

int main()
{
	int arr[] = { 9,8,7,6,5,4,3,2,1,0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	bubble_sort(arr,sz);
	print_arr(arr, sz);
	return 0;
}

//int main()
//{
//	char* p = "hello bit";
//	return 0;
//}